/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* qcom,msm-id =<Chip_id Board_version Other_Specific_info>
 * All these three fields are unsigned 32 bit integers
 * For OtherSpecificInfo = 0xABCDEFGH [32 bits in total]
 *  G[4BITS]:MODEL_VARIANT i.e. 0 for MS01,1 for MS01_3G, 2 for CT01, 3 for S3VE
 *  H[4BITS]:Hardware Revision
 * please refer to .../lk/platform/msm_shared/dev_tree.c also for how this works.
 */

/dts-v1/;
/include/ "msm8226-v2.dtsi"
/include/ "msm8226-sec-ms013geur-r04.dtsi"

/ {
	model = "[SM-G7108]MS01-Rev-04-MTP-v2";
	compatible = "qcom,msm8226-mtp", "qcom,msm8226", "qcom,mtp";
	qcom,msm-id = <145 8 0x20006>,
		      <158 8 0x20006>,
		      <159 8 0x20006>,
		      <198 8 0x20006>,
		      <205 8 0x20006>;
};

&soc {
    i2c@f9924000 { /* BLSP1 QUP2 */
		accelerometer@18 {
			compatible = "bma255-i2c";
			reg = <0x18>;
			interrupt-parent = <&msmgpio>;
			interrupts = <64 0>;
			bma255-i2c,i2c-pull-up = <1>;
			bma255-i2c,reg_vdd = "8226_l19";
			bma255-i2c,reg_vio = "8226_lvs1";
			bma255-i2c,acc_int1-gpio = <&msmgpio 64 0x1>;
			bma255-i2c,used_chip = "BMA25X_ENABLED";
			bma255-i2c,chip_pos = <3>;
		};
	};


	i2c@f9925000 { /* BLSP-1 QUP-3 */
		cell-index = <3>;
		compatible = "qcom,i2c-qup";
		reg = <0xf9925000 0x1000>;
		#address-cells = <1>;
		#size-cells = <0>;
		reg-names = "qup_phys_addr";
		interrupts = <0 97 0>;
		interrupt-names = "qup_err_intr";
		qcom,i2c-bus-freq = <400000>; /* 400 khz frequency needed for SEC_NFC */
		qcom,i2c-src-freq = <19200000>;
	};
	
	i2c@f9925000 {
	    sec-nfc@27 {
		compatible = "sec-nfc";
		reg = <0x27>;
		interrupt-parent = <&msmgpio>;
		interrupts = <21 0>;
		vdd_nfc-supply = <&pm8226_l6>;
		sec-nfc,en-gpio = <&msmgpio 36 0x00>;
		sec-nfc,firm-gpio = <&msmgpio 62 0x00>;
		sec-nfc,ven-gpio = <&msmgpio 20 0x00>;
		sec-nfc,irq-gpio = <&msmgpio 21 0x01>;
		//nfc_ldo-supply = <&pm8226_l23>;
	    };
	};

	earjack {

		/*Override GPIO properties*/
		qcom,earjack-detect-gpio = <&msmgpio 69 0>;
		qcom,earjack-sendend-gpio = <&msmgpio 35 0>;	
		
		/*Override det and btn zone ADC Values*/
			det-zones-list = <&det_zones 3 10000 10 0>,
                             <&det_zones 2700 10000 10 0>,
                             <&det_zones 2701 10000 10 1>,
                             <&det_zones 9999 10000 10 1>;
            but-zones-list = <&but_zones 0 0 970>,
                             <&but_zones 1 971 1416>,
                             <&but_zones 2 1417 9999>;
	};
};
